2ac4d656c641ecf18fd60a45c4add26aa79612ad,software/nosql/src/main/java/brooklyn/entity/nosql/redis/RedisStoreImpl.java,RedisStoreImpl,connectSensors,#,36
Before Change
.machine(machine)
.poll(new SshPollConfig<Integer>(UPTIME)
.command(getDriver().getRunDir() + "/bin/redis-cli info server")
.onError(Functions.constant(-1))
.onSuccess(infoFunction("uptime_in_seconds")))
.poll(new SshPollConfig<Integer>(TOTAL_CONNECTIONS_RECEIVED)
.command(statsCommand)
.onError(Functions.constant(-1))
.onSuccess(infoFunction("total_connections_received")))
.poll(new SshPollConfig<Integer>(TOTAL_COMMANDS_PROCESSED)
.command(statsCommand)
.onError(Functions.constant(-1))
.onSuccess(infoFunction("total_commands_processed")))
.poll(new SshPollConfig<Integer>(EXPIRED_KEYS)
.command(statsCommand)
.onError(Functions.constant(-1))
.onSuccess(infoFunction("expired_keys")))
.poll(new SshPollConfig<Integer>(EVICTED_KEYS)
.command(statsCommand)
.onError(Functions.constant(-1))
.onSuccess(infoFunction("evicted_keys")))
.poll(new SshPollConfig<Integer>(KEYSPACE_HITS)
.command(statsCommand)
.onError(Functions.constant(-1))
.onSuccess(infoFunction("keyspace_hits")))
.poll(new SshPollConfig<Integer>(KEYSPACE_MISSES)
.command(statsCommand)
.onError(Functions.constant(-1))
After Change
.machine(machine)
.poll(new SshPollConfig<Integer>(UPTIME)
.command(getDriver().getRunDir() + "/bin/redis-cli info server")
.onException(Functions.constant(-1))
.onFailure(Functions.constant(-1))
.onSuccess(infoFunction("uptime_in_seconds")))
.poll(new SshPollConfig<Integer>(TOTAL_CONNECTIONS_RECEIVED)
.command(statsCommand)
.onException(Functions.constant(-1))
.onFailure(Functions.constant(-1))
.onSuccess(infoFunction("total_connections_received")))
.poll(new SshPollConfig<Integer>(TOTAL_COMMANDS_PROCESSED)
.command(statsCommand)
.onException(Functions.constant(-1))
.onFailure(Functions.constant(-1))
.onSuccess(infoFunction("total_commands_processed")))
.poll(new SshPollConfig<Integer>(EXPIRED_KEYS)
.command(statsCommand)
.onException(Functions.constant(-1))
.onFailure(Functions.constant(-1))
.onSuccess(infoFunction("expired_keys")))
.poll(new SshPollConfig<Integer>(EVICTED_KEYS)
.command(statsCommand)
.onException(Functions.constant(-1))
.onFailure(Functions.constant(-1))
.onSuccess(infoFunction("evicted_keys")))
.poll(new SshPollConfig<Integer>(KEYSPACE_HITS)
.command(statsCommand)
.onException(Functions.constant(-1))
.onFailure(Functions.constant(-1))
.onSuccess(infoFunction("keyspace_hits")))
.poll(new SshPollConfig<Integer>(KEYSPACE_MISSES)
.command(statsCommand)
.onException(Functions.constant(-1))